@extends('layouts.layouts')
@section('title')
    <title>平台作者列表</title>
@endsection
@section('content')
<div class="content">
        <div class="header">       
            <h1 class="page-title">平台作者列表</h1>
            <ul class="breadcrumb"></ul>
        </div>
        <div class="main-content">
<div class="btn-toolbar list-toolbar">
    <a href="/admin/authoradd"><button class="btn btn-primary"><i class="fa fa-plus"></i>添加平台作者</button></a>
    <!--<button class="btn btn-default">Import</button>
    <button class="btn btn-default">Export</button>-->
  <div class="btn-group">
  </div>
</div>
 <div class="panel panel-default">
   <div class="panel-heading no-collapse">作者列表<!-- <span class="label label-warning">+10</span> --></div>
<table class="table">
  <thead>
    <tr>
      <th>#</th>
      <th>名字</th>
      <th>头像</th>
      <th>email</th>
      <th>状态</th>
      <th style="width: 3.5em;"></th>
    </tr>
  </thead>
  <tbody>
@if($arr)
  @foreach ($arr as $v)
    <tr>
      <td>{{ $v->id }}</td>
      <td>{{ $v->name }}@if($v->is_author == 1) (<a href="javascript:(0);"><i class="glyphicon glyphicon-user"></i>平台作者</a>) @endif</td>
      <td>
        @if(strpos($v->avatar,'http') !== false)
          <img class="pimg" src="{{$v->avatar}}" height="60" />
        @else
          <img class="pimg" src="{{env('IMG_URL')}}{{$v->avatar}}" height="60" />
        @endif
      </td>
      <td>{{ $v->email }}</td>
      <td>@if($v->status == 0) 禁用 @else 显示 @endif</td>
      <td width="30%">
          <a href="{{url('admin/authoredit')}}?id={{$v->id}}"><i class="fa fa-pencil"></i>编辑</a>&nbsp;|
          <a href="{{url('admin/authordel')}}?id={{$v->id}}" role="button" data-toggle="modal"><i class="fa fa-trash-o"></i>删除</a>
      </td>
    </tr>
@endforeach
@endif
  </tbody>
</table>
</div>
<ul class="pagination">
{{ $arr->links() }}
</ul>
</div>
</div>
<script type="text/javascript">
    $("[rel=tooltip]").tooltip();
    $(function() {
        $('.demo-cancel-click').click(function(){return false;});
    });
</script>
@endsection
